package com.baimsg.reader.thread

import java.util.concurrent.Executors
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit

/**
 * Create by Baimsg on 2022/3/21
 *
 **/
object TaskThreadPoolExecutor {
    val threadPoolExecutor by lazy {
        ThreadPoolExecutor(
            8,
            Int.MAX_VALUE,
            8,
            TimeUnit.SECONDS,
            LinkedBlockingQueue(),
            Executors.defaultThreadFactory(),
            TaskPolicy()
        )
    }
}